<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>打印九九乘法表</title>
    <script>
        //在网页上使用js函数，打印九九乘法表
        function f() {
            for(i=1;i<=9;i++){
                for(j=1;j<=i;j++){
                    let str = j+"x"+i+"="+i*j;
                    document.write(str)
                    if(i*j<10){
                        document.write("&nbsp;&nbsp")
                    }
                    document.write("&nbsp;&nbsp");
                }
                document.write('<br>');
            }
        }

        window.onload=f();

    </script>
</head>
<body>


</body>
</html>